from sklearn.datasets import load_iris
# 导入朴素贝叶斯模型，选择高斯分类器
from sklearn.naive_bayes import GaussianNB

X, y = load_iris(return_X_y=True)

bayes_model = GaussianNB()
bayes_model.fit(X, y)

result = bayes_model.predict(X)
print(result)

score = bayes_model.score(X,y)
print(score)